<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>我的仓库</title>
</head>
<body>

<table>

<tr>
<th>货品名</th>
<th>货品价格</th>
<th>货品数量</th>、
<th>货品生产日期</th>
<th>操作1</th>
<th>操作2</th>
</tr>


<c:forEach items="${ws}" var="wss">
	<c:if test="${curw==wss.id}">
	<h1><a href="listupdate?wid=${wss.id}">${wss.addr}</a></h1>
	</c:if>
    <c:if test="${curw!=wss.id}">
		 <h1><a href="listupdate?wid=${wss.id}" style="color:red;">${wss.addr}</a></h1>
		 </c:if>

	
</c:forEach>



<c:forEach items="${plist}" var="p">
	<tr>
	<td>${p.name}</td>
	 
	 	<td>
		 <fmt:formatNumber value="${p.price}" pattern="$##,###.00"></fmt:formatNumber>
		</td>
		
		<td>${p.count}</td>
		
		 <td>
		<fmt:formatDate value="${p.pd}" pattern="yyyy年MM月dd日"/>
		</td>

		 <td><a href="delete?id=${p.id}">刪除</a></td>
		 <td><a href="goingupdate?id=${p.id}">更新</a></td>
	</tr>

</c:forEach>
</table>

</body>
</html>